package gom.example.gramediamajalah;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.zip.Inflater;

import android.app.Activity;
import android.content.Context;
import android.provider.ContactsContract.Data;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class SearchAdapter extends BaseAdapter {
	
	private Activity activity;
	private ArrayList<HashMap<String, String>>data;
	private static LayoutInflater inflater=null;
	
	public SearchAdapter (Activity a,ArrayList<HashMap<String, String>>d ){
	activity = a;
	data = d;
	inflater = (LayoutInflater)activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
	
	}

	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public Object getItem(int arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public long getItemId(int arg0) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		View vi = convertView;
		if (convertView == null)
			vi = inflater.inflate(R.layout.list_item, null);

		TextView title = (TextView) vi.findViewById(R.id.title);

		HashMap<String, String> song = new HashMap<String, String>();
		song = data.get(position);

		
		// Setting all values in listview
		title.setText(song.get(MainSearch.TAG_TITLE));
	
		return vi;
	}
	
}
